Weird behavior in IE7 with DIVs wrapped in links

Weird behavior in IE7 with DIVs wrapped in links

am 19.09.2007 15:58:11 von Daniel Smedegaard Buus

Hey you guys!

I'm having this weird issue with IE7 and some DIVs that contain
links... It's a customized WordPress theme, using transparent PNGs for
some buttons. Because they're transparent, to get them to show right
in IE6 I had to implement them as backgrounds for DIVs with one of the
"filters" that IE6 can use. Like this (the site in question is
http://mortengoll.org by the way):

=== Begin HTML for the buttons ===

Re: Weird behavior in IE7 with DIVs wrapped in links

am 19.09.2007 16:34:50 von John Hosking

Daniel Smedegaard Buus wrote:
> Hey you guys!

"We're gonna turn on the power..."

Oh, you're not Rita Moreno. ;-)
(http://en.wikipedia.org/wiki/The_Electric_Company)

>
> I'm having this weird issue with IE7 and some DIVs that contain
> links...

Wait a minute, is it divs that contain links, or links that "contain"
divs, as in your post's subject line?

If you try to put a

inside an , you *should* get weird issues,
because the code is invalid. (Or maybe it's not so weird after all.)

> It's a customized WordPress theme, using transparent PNGs for
> some buttons. Because they're transparent, to get them to show right
> in IE6 I had to implement them as backgrounds for DIVs with one of the
> "filters" that IE6 can use. Like this (the site in question is
> http://mortengoll.org by the way):
>
> === Begin HTML for the buttons ===

You gave us the URL (kudos), so we don't need this much pasted code.

>

Re: Weird behavior in IE7 with DIVs wrapped in links

am 19.09.2007 17:49:49 von Daniel Smedegaard Buus

On Sep 19, 4:34 pm, John Hosking
wrote:
> Daniel Smedegaard Buus wrote:
> > Hey you guys!
>
> "We're gonna turn on the power..."
>
> Oh, you're not Rita Moreno. ;-)
> (http://en.wikipedia.org/wiki/The_Electric_Company)
>
>
>
> > I'm having this weird issue with IE7 and some DIVs that contain
> > links...
>
> Wait a minute, is it divs that contain links, or links that "contain"
> divs, as in your post's subject line?
>
> If you try to put a

inside an , you *should* get weird issues,
> because the code is invalid. (Or maybe it's not so weird after all.)
>

Oh yeah, I get that, and I can see that I've thrown myself into the
ring for a bashing, but that's quite (all)right, I know this isn't
exactly kosher coding :) But, when you're told what to do, and left
only with hacking it out to make it work on the browsers that exist,
well, I do just that ;) And this is where I got with what worked on
the browsers I could test at the time. I simply cannot find any other
way to get transparency working in this scenario with IE6. So yeah, I
guess "weird" would apply to the browsers in which it actually does
work, as opposed to IE7, where it doesn't.

> > It's a customized WordPress theme, using transparent PNGs for
> > some buttons. Because they're transparent, to get them to show right
> > in IE6 I had to implement them as backgrounds for DIVs with one of the
> > "filters" that IE6 can use. Like this (the site in question is
> >http://mortengoll.orgby the way):
>
> > === Begin HTML for the buttons ===
>
> You gave us the URL (kudos), so we don't need this much pasted code.
>

Nope, but it helps for commenting, even if it's just to say you didn't
need the PHP ;)

> >

Re: Weird behavior in IE7 with DIVs wrapped in links

am 19.09.2007 18:46:33 von Daniel Smedegaard Buus

Well, it turns out I'm in luck!

The customer doesn't care about the rounded corners now, so I get to
go with regular, squared gifs for buttons, so that should enable me to
create valid and simple css and html withour any hacks! Yay :)

Cheers though,

Daniel :)